Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deployments/data-streams): adds don related label to node registration #16534

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

giogam
Copy link
Collaborator

@giogam giogam commented Feb 24, 2025

This PR adds an additional label to indicate the DON a node belongs to, making it easier to retrieve a set of nodes from a specific DON in data-streams changesets.

Requires

Supports

@giogam giogam requested review from a team as code owners February 24, 2025 09:40
@giogam giogam changed the title chore(data-streams): adds don related label to node registration chore(deployments/data-streams): adds don related label to node registration Feb 24, 2025
@giogam giogam enabled auto-merge February 24, 2025 13:26
labels = append(labels, &ptypes.Label{
Key: "nodeType",
Value: &ntStr,
})

labels = append(labels, &ptypes.Label{
Key: fmt.Sprintf("don-%d-%s", donID, donName),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This key feels off. Isn't that a value that we should assign to a key?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, alternatively, we could use a don key and assign fmt.Sprintf("don-%d-%s", donID, donName) as its value. However, this approach would limit us to a single value per key. For instance, if you wanted to label a node with two DONs, there wouldn’t be a way to attach multiple values to the same key.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see, so this is a "presence marker", i.e. a boolean flag. Sure, works for me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose whether this is a limitation for data-streams depends on how the product is operated, but it might still be a good idea to future-proof the implementation regardless.

@giogam giogam added this pull request to the merge queue Feb 24, 2025
Merged via the queue into develop with commit 5cecc77 Feb 24, 2025
162 checks passed
@giogam giogam deleted the DPA-1556/add-don-label-to-nodes-registration branch February 24, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants